﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    /// <summary>
    /// 接口
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IProvider<T> where T : class //泛型的
    {
        //在接口定义几个最基本的方法
        /// <summary>
        /// 查询所有记录
        /// </summary>
        /// <returns></returns>
        List<T> Select();
        /// <summary>
        /// 插入一条记录
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Insert(T t);
        /// <summary>
        /// 删除一条记录
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Delete(T t);
        /// <summary>
        /// 修改一条记录
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Update(T t);

    }
    //对四个表进行操作创建四个类
}
